package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class ConnectDeviceRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/Scan_Album_QrCode";

    private String deviceId;

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        ConnectDeviceRequestBody body = new ConnectDeviceRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setDeviceId(getDeviceId());
        return body;
    }

    private class ConnectDeviceRequestBody extends BaseTokenRequestBody {

        @SerializedName("QRCode")
        private String deviceId;

        private ConnectDeviceRequestBody() {
            setSv(BaseRequestConfig.SV_CONNECT_DEVICE);
        }

        public String getDeviceId() {
            return deviceId;
        }

        public void setDeviceId(String deviceId) {
            this.deviceId = deviceId;
        }
    }
}
